#!/bin/bash
# 安装依赖
yum install -y curl policycoreutils policycoreutils-python policycoreutils-python-utils openssh-server openssh-clients 
systemctl enable sshd 
systemctl start sshd

# 使用postfix发送邮件通知
yum install -y postfix 
systemctl enable postfix 
systemctl start postfix
# wget gitlab-ce https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-12.8.7-ce.0.el8.x86_64.rpm -O /opt/software/gitlab-ce.rpm

# 开始下载
URL=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-12.0.3-ce.0.el7.x86_64.rpm
source ../linux/download_unzip.sh "gitlab" $URL


# $ sudo vim /etc/gitlab/gitlab.rb
# 指定访问的端口
# external_url 'http://127.0.0.1:9090'

# 重启gitlab
# $ gitlab-ctl reconfigure
# 访问 http://127.0.0.1:9090/
# 首次访问需要初始化root密码，设置完成后，就能使用root登录